<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <script src="/layui/layui.js"></script>
    <script src="/js/jquery/jquery-3.5.1.js"></script>
    <script src="/js/book/book.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <link rel="stylesheet" href="/css/readBook.css">
    <title>内容</title>


</head>
<body>

    <div class="page-style">
        <div class="left-wrap"></div>
        <div class="right-wrap">
            <div class="book-title">
                <h3 class="text-head" data-type="2">
                    <span class="book-title" id="head"/>
                </h3>
            </div>

             <div class="book-area" id="book-area">
                 </div>
            <div>
                <table>
                    <tr class="book-area-bottom" style="width: 80%;text-align: center;">
                        <td style="height: 100px;    width: 200px;"><div class="bottom-button" th:id="up" >上一章</div></td>
                        <td style="height: 100px;    width: 200px;"><div class="bottom-button" th:id=" menu" >目录</div></td>
                        <td style="height: 100px;    width: 200px;"><div  class="bottom-button" th:id="down">下一章</div></td>
                    </tr>
                </table>
             </div>
        </div>
    </div>

    <script type="text/javascript"  th:inline="javascript">
        debugger;
       var  titleName="";
        var titleUp=null;
        var titledown=null;
        var bookCode="";
       var param  = [[${data}]];
        $.ajax({
            type:"post",
            url:'/book/readBook/queryText',
            data:param,
            dataType:"json",
            async:false,
            contentType : "application/json; charset=utf-8",
            success: function(res){
                var data = res.data;
                 titleName=data.titleName;
                 bookCode = data.bookCode;
                var titleText = data.titleText;
                 titleUp=data.titleUp;
                 titledown=data.titledown;
                document.title = titleName;
                $("#head").html(titleName);
                $("#book-area").append(titleText);
            }

        })
    </script>

<!--    <script type="text/javascript"  th:inline="javascript">
        var data = [[${data}]];
        var titleName=data.titleName;
        var bookCode = data.bookCode;
        var titleText = data.titleText;
        document.title = titleName;
        $("#head").html(titleName);
        $("#book-area").append(titleText);
    </script>-->
</body>
</html>